Skip to content

Conversation

@cyphar
Copy link
Member

@cyphar cyphar commented Nov 27, 2025

Each release requires going through the list of PRs and trying to parse
out what a reasonable changelog entry is (possibly ~6 months after the
patch was last discussed and merged), which makes preparing release
notes quite time-consuming.

Given that the moment when the patch is merged is when the information
about the imapct of a patch is most apparent to the author and
reviewers, it seems prudent to require that every PR have a CHANGELOG.md
change. Trivial patches can just add a dummy entry in the changelog (in
future, we can expand this script to skip over commits that have some
special tag to avoid the need for dummy entries).

Signed-off-by: Aleksa Sarai [email protected]

@cyphar cyphar force-pushed the gha-enforce-changelog branch 5 times, most recently from 5b81927 to ec76631 Compare November 27, 2025 01:07
Each release requires going through the list of PRs and trying to parse
out what a reasonable changelog entry is (possibly ~6 months after the
patch was last discussed and merged), which makes preparing release
notes quite time-consuming.

Given that the moment when the patch is merged is when the information
about the imapct of a patch is most apparent to the author and
reviewers, it seems prudent to require that every PR have a CHANGELOG.md
change. Trivial patches can just add a dummy entry in the changelog (in
future, we can expand this script to skip over commits that have some
special tag to avoid the need for dummy entries).

Signed-off-by: Aleksa Sarai <[email protected]>
@cyphar cyphar force-pushed the gha-enforce-changelog branch from c8464c3 to ba302df Compare November 27, 2025 01:16
@cyphar cyphar marked this pull request as ready for review November 27, 2025 01:16
@cyphar cyphar added this to the 1.4.1 milestone Nov 27, 2025
@cyphar cyphar added backport/1.2-todo A PR in main branch which needs to be backported to release-1.2 backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 backport/1.4-todo A PR in main branch which needs to backported to release-1.4 labels Nov 27, 2025
opencontainers/cgroups#50)

### Changed ###
- CI: All PRs now require a corresponding `CHANGELOG.md` change be included,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely to just result in making the changelog lengthy and unreadable.
Also we will no longer be able to merge dependabot PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just migrate the changelog to wiki so that we can add changelog items without submitting PRs

Copy link
Member Author

@cyphar cyphar Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will we make sure it gets updated on time? The current situation is that PRs get merged and then you need to figure out what to write for the changelog months later.

I would prefer to not have it be mandatory but it seems we are nowhere near consistent enough to enforce this through regular reviews.

For dependabot or minor PRs, I can adjust this CI job to allow-list PRs with special tags or by special committer emails...

One other option would be to enforce having a "for the changelog" section of the PR but then we would probably want to script collating them...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we have to add this somehow, and I guess adding the entry directly to CHANGELOG.md seems most straightforward. The downsides are

  • there will definitely be more merge conflicts, especially for backports;
  • dependabot PRs won't work (guess we can add an exception);
  • the changelog style might end up less uniform;
  • might make things more complicated for new contributors.

Perhaps we can try to enforce this manually for now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen other projects avoid the merge conflict problem by using a directory and making a new file for each change. This has some extra overhead for everyone though, as the filenames are mean to be the PR number (submitters need to re-commit with the right PR number and we will still have to collate them).

For the dependabot PR issue we can make it a non-required CI job and so we can merge dependabot PRs but human PRs will have a failure so the submitter can proactively fix the issue.

Perhaps we can try to enforce this manually for now?

I think it'd be too easy to forget and having it be a CI job means that submitters can proactively fix it without needing us to remember to tell them.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thaJeztah
Copy link
Member

FWIW, in moby we added a changelog section in the PR template so that we can extract those. Depending on the PR type, it's still optional, but perhaps variations thereof are possible (eg don't enforce if it's just a dependency bump); at least that prevents the merge-conflicts and allows tweaking changelog entries.
https://github.com/moby/moby/blob/06eadccf2fd03ed4aca8f467f38eb6dd7be48922/.github/PULL_REQUEST_TEMPLATE.md?plain=1#L22-L34

https://github.com/moby/moby/blob/06eadccf2fd03ed4aca8f467f38eb6dd7be48922/.github/workflows/validate-pr.yml#L16-L93

@cyphar
Copy link
Member Author

cyphar commented Dec 4, 2025

@thaJeztah Ah, I didn't know it was that automated. That might be a good way of doing it, let me take a look...

EDIT: Is the changelog collation also automated?

@thaJeztah
Copy link
Member

It's definitely still a bit of work in progress, but perhaps good for inspiration / building blocks to come with something useful.

I think many projects struggle with this; it's always hard to find the right balance between preparing the work as part of the PR (but tying to keep it low threshold), and still have some flexibility (also for those cases where PRs are superseded by follow ups, so not all changes may still be relevant).

containerd uses a release tool that has some magic (but ultimately uses a toml file to collect change logs / allow preparing the release notes); it works, and also handles dependency updates, but perhaps could be combined with something like the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.2-todo A PR in main branch which needs to be backported to release-1.2 backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 backport/1.4-todo A PR in main branch which needs to backported to release-1.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants